home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / RMIFailureHandler.java < prev    next >
Text File  |  1998-09-22  |  2KB  |  50 lines

  1. /*
  2.  * @(#)RMIFailureHandler.java    1.4 98/07/01
  3.  *
  4.  * Copyright 1995-1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  * 
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.rmi.server;
  16.  
  17. /**
  18.  * An <code>RMIFailureHandler</code> can be registered via the
  19.  * <code>RMISocketFactory.setFailureHandler</code> call. The
  20.  * <code>failure</code> method of the handler is invoked when the RMI
  21.  * runtime is unable to create a <code>ServerSocket</code> to listen
  22.  * for incoming calls. The <code>failure</code> method returns a boolean
  23.  * indicating whether the runtime should attempt to re-create the
  24.  * <code>ServerSocket</code>.
  25.  *
  26.  * @author     Ann Wollrath
  27.  * @version    1.4, 07/01/98
  28.  * @since     JDK1.1
  29.  */
  30. public interface RMIFailureHandler {
  31.  
  32.     /**
  33.      * The <code>failure</code> callback is invoked when the RMI
  34.      * runtime is unable to create a <code>ServerSocket</code> via the
  35.      * <code>RMISocketFactory</code>. An <code>RMIFailureHandler</code>
  36.      * is registered via a call to
  37.      * <code>RMISocketFacotry.setFailureHandler</code>.  If no failure
  38.      * handler is installed, the default behavior is to attempt to
  39.      * re-create the ServerSocket.
  40.      *
  41.      * @param ex the exception that occurred during <code>ServerSocket</code>
  42.      *           creation
  43.      * @return if true, the RMI runtime attempts to retry
  44.      * <code>ServerSocket</code> creation
  45.      */
  46.     public boolean failure(Exception ex);
  47.     
  48. }
  49.  
  50.